s = input().split(" ")
x1 = float(s[0])
y1 = float(s[1])
x2 = float(s[2])
y2 = float(s[3])
x3 = float(s[4])
y3 = float(s[5])
x4 = float(s[6])
y4 = float(s[7])
a = y1 - y2
b = -(x1 - x2)
c = y3 - y4
d = -(x3 - x4)
e = a * x1 + b * y1
f = c * x3 + d * y3
delt = a * d - b * c
if delt == 0:
    print("两条直线平行")
else:
    x = (e * d - b * f) / delt
    y = (a * f - e * c) / delt
    print("%.2f %.2f" % (x, y))
